package com.uidt.project.ptsj.service.impl;

import java.util.List;
import com.uidt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uidt.project.ptsj.mapper.ScoreRecordMapper;
import com.uidt.project.ptsj.domain.ScoreRecord;
import com.uidt.project.ptsj.service.IScoreRecordService;

/**
 * 打分记录Service业务层处理
 * 
 * @author uidt
 * @date 2024-08-12
 */
@Service
public class ScoreRecordServiceImpl implements IScoreRecordService 
{
    @Autowired
    private ScoreRecordMapper ptsjScoreRecordMapper;

    /**
     * 查询打分记录
     * 
     * @param id 打分记录主键
     * @return 打分记录
     */
    @Override
    public ScoreRecord selectScoreRecordById(Long id)
    {
        return ptsjScoreRecordMapper.selectScoreRecordById(id);
    }

    /**
     * 查询打分记录列表
     * 
     * @param ptsjScoreRecord 打分记录
     * @return 打分记录
     */
    @Override
    public List<ScoreRecord> selectScoreRecordList(ScoreRecord ptsjScoreRecord)
    {
        return ptsjScoreRecordMapper.selectScoreRecordList(ptsjScoreRecord);
    }

    /**
     * 新增打分记录
     * 
     * @param ptsjScoreRecord 打分记录
     * @return 结果
     */
    @Override
    public int insertScoreRecord(ScoreRecord ptsjScoreRecord)
    {
        return ptsjScoreRecordMapper.insertScoreRecord(ptsjScoreRecord);
    }

    /**
     * 修改打分记录
     * 
     * @param ptsjScoreRecord 打分记录
     * @return 结果
     */
    @Override
    public int updateScoreRecord(ScoreRecord ptsjScoreRecord)
    {
        ptsjScoreRecord.setUpdateTime(DateUtils.getNowDate());
        return ptsjScoreRecordMapper.updateScoreRecord(ptsjScoreRecord);
    }

    /**
     * 批量删除打分记录
     * 
     * @param ids 需要删除的打分记录主键
     * @return 结果
     */
    @Override
    public int deleteScoreRecordByIds(Long[] ids)
    {
        return ptsjScoreRecordMapper.deleteScoreRecordByIds(ids);
    }

    /**
     * 删除打分记录信息
     * 
     * @param id 打分记录主键
     * @return 结果
     */
    @Override
    public int deleteScoreRecordById(Long id)
    {
        return ptsjScoreRecordMapper.deleteScoreRecordById(id);
    }
}
